package cn.iocoder.yudao.module.system.controller.admin.pushManage.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
* 推送管理 Base VO，提供给添加、修改、详细的子 VO 使用
* 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
*/
@Data
public class PushManageBaseVO {

    @ApiModelProperty(value = "推送名称", required = true)
    @NotNull(message = "推送名称不能为空")
    private String pushName;

    @ApiModelProperty(value = "推送类型 0 立即推送 1定时推送-单次 2定时推送-重复", required = true)
    @NotNull(message = "推送类型不能为空")
    private Long type;

    @ApiModelProperty(value = "推送对象 0 全部 1企业 2学生")
    private Long pushObject;

    @ApiModelProperty(value = "推送对象id集合 json")
    private String pushObjectId;

    @ApiModelProperty(value = "推送模块 0 系统通知 1实习招聘 2实践项目")
    private Long pushModule;

    @ApiModelProperty(value = "执行时间")
    private int actionTime;

    @ApiModelProperty(value = "0每天 1每周 2每月")
    private Long actionFrequency;


    @ApiModelProperty(value = "状态1 启动 2停用")
    private String status;


    @ApiModelProperty(value = "开始时间", required = true)
//    @NotNull(message = "开始时间不能为空")
    @JsonFormat(shape= JsonFormat.Shape.STRING, timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @ApiModelProperty(value = "结束时间", required = true)
//    @NotNull(message = "结束时间不能为空")
    @JsonFormat(shape= JsonFormat.Shape.STRING, timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty(value = "标题", required = true)
    @NotNull(message = "标题不能为空")
    private String title;

    @ApiModelProperty(value = "内容", required = true)
    @NotNull(message = "内容不能为空")
    private String messageText;

    @ApiModelProperty(value = "单次执行时间" )
    private String singleTime;

    @ApiModelProperty(value = "当日执行次数")
    private Integer actionNum;

    @ApiModelProperty(value = "消息类型 0站内信1短信2邮箱")
    private String messageType;

    @ApiModelProperty(value = "推送对象类型 0全部 1部分")
    private Long pushObjectType;

    @ApiModelProperty(value = "推送日 周一 1号")
    private Integer actionDay;

    @ApiModelProperty(value = "是否短信通知 0不通知 1通知")
    private Integer isSms;

    @ApiModelProperty(value = "创建者")
    private String creator;
    @ApiModelProperty(value = "上次执行时间")
    private Date oldPushTime;
}
